Since commit
35494f5d08, all menus are closed when their source
gets unmapped.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1948>
this.actor.add_style_class_name('app-well-menu');
- // Chain our visibility and lifecycle to that of the source
- this._sourceMappedId = source.connect('notify::mapped', () => {
- if (!source.mapped)
- this.close();
- });
- source.connect('destroy', () => {
- source.disconnect(this._sourceMappedId);
- this.destroy();
- });
-
Main.uiGroup.add_actor(this.actor);
}